/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   Module Name          : com.yaodian100.ec.campaign.entity.CampaignDiscount
   Module Description   :

   Date Created      : 2010/1/5
   Original Author   : jeff.ma
   Team              : yaodian100
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   MODIFICATION HISTORY
   ------------------------------------------------------------------------------
   Date Modified       Modified by       Comments
   ------------------------------------------------------------------------------
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
package com.yaodian100.ec.campaign.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Type;

import com.yaodian100.core.common.entity.BaseEntity;

/**
 * @author jeff.ma
 * 
 */
@Entity
@Table(name = "EC_CAMPAIGN_DISCOUNT")
public class CampaignDiscount extends BaseEntity {

	/** serialVersionUID */
	private static final long serialVersionUID = -5996196878022131354L;
	@Id
	@GeneratedValue(generator = "gen_uuid")
	@GenericGenerator(name = "gen_uuid", strategy = "uuid")
	@Column(name = "OBJ_UUID")
	private String uuid;
	/**
	 * 活动名称 Campaign Name
	 */
	@Column(name = "CAMPAIGN_NAME", length = 40, nullable = false)
	private String campaignName;
	/**
	 * 活动开始时间 Start Date
	 */
	@Column(name = "START_DATE_TIME", nullable = false)
	@Temporal(TemporalType.TIMESTAMP)
	private Date startDateTime;

	/**
	 * 活动结束时间 End Date
	 */
	@Column(name = "END_DATE_TIME", nullable = false)
	@Temporal(TemporalType.TIMESTAMP)
	private Date endDateTime;
	/** discount 折扣金額 */
	@Column(name = "CAMPAIGN_DISCOUNT", length = 500, nullable = false)
	private String discountData;

	/**
	 * 适用会员等级 Allow Member Rank
	 */
	@Column(name = "ALLOW_MEMBER_RANK", length = 20, nullable = false)
	private String allowMemberRank = "00";
	/**
	 * 最低订单金额 Minimal Order Amount, 即订单需满足此金额才能适用此活动优惠
	 */
	@Column(name = "MIN_ORDER_AMOUNT")
	private BigDecimal minOrderAmount;
	/**
	 * 该活动是否启用, Y: 是； N: 否
	 */
	@Column(name = "IS_ENABLE", nullable = false)
	@Type(type = "yes_no")
	private boolean enable = true;

	/**
	 * 备注栏位
	 */
	@Column(name = "MEMO", length = 200)
	private String memo;

	/**
	 * 删除标记 , Y: 是； N: 否
	 */
	@Column(name = "IS_DELETE", nullable = false)
	@Type(type = "yes_no")
	private boolean delete = false;

	/**
	 * 购物车提示html
	 */
	@Column(name = "SHOPPING_HTML", length = 400)
	private String shoppingHtml;

	/**
	 * 结帐页提示html
	 */
	@Column(name = "ORDERINFO_HTML", length = 400)
	private String orderinfoHtml;

	@Column(name = "SHIP_EXPENSE_RANK", length = 20, nullable = false)
	private String shipExpenseRank = "1,1,1,1,1,1";
	
	/** default constructor */
	public CampaignDiscount() {
	}

	/**
	 * @return the uuid
	 */
	public String getUuid() {
		return uuid;
	}

	/**
	 * @param uuid the uuid to set
	 */
	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	/**
	 * @return the campaignName
	 */
	public String getCampaignName() {
		return campaignName;
	}

	/**
	 * @param campaignName the campaignName to set
	 */
	public void setCampaignName(String campaignName) {
		this.campaignName = campaignName;
	}

	/**
	 * @return the startDateTime
	 */
	public Date getStartDateTime() {
		return startDateTime;
	}

	/**
	 * @param startDateTime the startDateTime to set
	 */
	public void setStartDateTime(Date startDateTime) {
		this.startDateTime = startDateTime;
	}

	/**
	 * @return the endDateTime
	 */
	public Date getEndDateTime() {
		return endDateTime;
	}

	/**
	 * @param endDateTime the endDateTime to set
	 */
	public void setEndDateTime(Date endDateTime) {
		this.endDateTime = endDateTime;
	}

	/**
	 * @return the discountData
	 */
	public String getDiscountData() {
		return discountData;
	}

	/**
	 * @param discountData the discountData to set
	 */
	public void setDiscountData(String discountData) {
		this.discountData = discountData;
	}

	/**
	 * @return the allowMemberRank
	 */
	public String getAllowMemberRank() {
		return allowMemberRank;
	}

	/**
	 * @param allowMemberRank the allowMemberRank to set
	 */
	public void setAllowMemberRank(String allowMemberRank) {
		this.allowMemberRank = allowMemberRank;
	}

	/**
	 * @return the minOrderAmount
	 */
	public BigDecimal getMinOrderAmount() {
		return minOrderAmount;
	}

	/**
	 * @param minOrderAmount the minOrderAmount to set
	 */
	public void setMinOrderAmount(BigDecimal minOrderAmount) {
		this.minOrderAmount = minOrderAmount;
	}

	/**
	 * @return the enable
	 */
	public boolean isEnable() {
		return enable;
	}

	/**
	 * @param enable the enable to set
	 */
	public void setEnable(boolean enable) {
		this.enable = enable;
	}

	/**
	 * @return the memo
	 */
	public String getMemo() {
		return memo;
	}

	/**
	 * @param memo the memo to set
	 */
	public void setMemo(String memo) {
		this.memo = memo;
	}

	/**
	 * @return the delete
	 */
	public boolean isDelete() {
		return delete;
	}

	/**
	 * @param delete the delete to set
	 */
	public void setDelete(boolean delete) {
		this.delete = delete;
	}

	public String getShoppingHtml() {
		return shoppingHtml;
	}

	public void setShoppingHtml(String shoppingHtml) {
		this.shoppingHtml = shoppingHtml;
	}

	public String getOrderinfoHtml() {
		return orderinfoHtml;
	}

	public void setOrderinfoHtml(String orderinfoHtml) {
		this.orderinfoHtml = orderinfoHtml;
	}

	public String getShipExpenseRank() {
		return shipExpenseRank;
	}

	public void setShipExpenseRank(String shipExpenseRank) {
		this.shipExpenseRank = shipExpenseRank;
	}

}
